package com.sofwin.controller;

import com.github.pagehelper.PageInfo;
import com.sofwin.pojo.BUser;
import com.sofwin.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;


@Controller
@RequestMapping("login")
public class UserController {
    @Autowired
    UserService userService;

    @GetMapping("/b")
    public String test02(Model model){
        PageInfo<BUser> bUserPageInfo = userService.queryByPage(null,1,4);
        model.addAttribute("page",bUserPageInfo);
        return  "WEB-INF/index.jsp";
    }

}
